import { modelAdd, meshAdd } from './modelOpera.js';

class House {
  constructor(scene) {
    const meshData = [
      { name: '左边墙', l: 860, w: 300, h: 2, x: 0, y: 0, z: 350, color: 0xcccccc, opacity: 0.2 },
      { name: '上边墙', l: 2, w: 300, h: 700, x: 430, y: 0, z: 0, color: 0xcccccc, opacity: 0.2 },
      { name: '右边墙', l: 860, w: 300, h: 2, x: 0, y: 0, z: -350, color: 0xcccccc, opacity: 0.2 },
      { name: '下边墙', l: 2, w: 300, h: 700, x: -430, y: 0, z: 0, color: 0xcccccc, opacity: 0.2 },
      { name: '地板', l: 860, w: 4, h: 700, x: 0, y: -152, z: 0, color: 0xffffff, image: './images/木地板.png', repeatX: 40.5, repeatY: 12.5 },
      { name: '瓷砖', l: 200, w: 10, h: 700, x: -330, y: -144, z: 0, color: 0xffffff, image: './images/防静电地板.png', repeatX: 2.5, repeatY: 9.5 },
    ];
    new meshAdd(scene, meshData);

    const modelData = [
      { url: './model/灭火器.fbx', num: 1, x: 275, y: -97, z: -324 },
      {
        url: './fbx/第一排机柜.fbx', children: [
          { num: 3, x: 310, y: -62, z: 195, offsetZ: -80 }
        ]
      },
      { url: './fbx/F架机柜.fbx', num: 1, x: 172, y: 16.5, z: 190 },
    ];
    new modelAdd(modelData, (group) => {
      scene.add(group);
    });
  }
}

export { House }; 